package com.yanqu.road.server.cmd.activity.climbtower;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.ClimbTowerProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.gameplayer.module.activity.climbtower.ClimbTowerModule;
import com.yanqu.road.server.protocol.Protocol;

@Cmd(code = Protocol.S_CLIMB_TOWER_DRAW_TEST, desc = "抽签测试；炼妖")
public class ClimbTowerDrawTestCmd extends AbstractCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {

        ClimbTowerProto.ClimbTowerDrawTestReqMsg reqMsg = ClimbTowerProto.ClimbTowerDrawTestReqMsg.parseFrom(packet.getBytes());
        int times = reqMsg.getTimes();
        player.getModule(ClimbTowerModule.class).testDraw(times);
    }

    @Override
    public void sendData(GamePlayer player) {

    }
}
